package org.example01.System1;

import java.time.LocalDate;

public class JuniorHighStudent extends Student implements eveningStudy {
    int HistoryScore;
    int PhysicsScore;

    public JuniorHighStudent(String ID, String name, int ChineseScore, int MathScore, int historyScore, int physicsScore, LocalDate EnterDate, String Email,String studentStatus) {
        super(ID, name, ChineseScore, MathScore, EnterDate, Email, studentStatus);
        HistoryScore = historyScore;
        PhysicsScore = physicsScore;
    }
    public JuniorHighStudent(String ID, String name, int ChineseScore, int MathScore, int historyScore, int physicsScore, LocalDate EnterDate, String Email) {
        super(ID, name, ChineseScore, MathScore, EnterDate, Email);
        HistoryScore = historyScore;
        PhysicsScore = physicsScore;
    }

    public JuniorHighStudent(String ID, String name, int ChineseScore, int MathScore, int HistoryScore, int PhysicsScore, LocalDate date) {
        super(ID, name, ChineseScore, MathScore, date);
        this.HistoryScore = HistoryScore;
        this.PhysicsScore = PhysicsScore;
    }

    public JuniorHighStudent(String ID, String name, int ChineseScore, int MathScore, int HistoryScore, int PhysicsScore) {
        super(ID, name, ChineseScore, MathScore);
        this.HistoryScore = HistoryScore;
        this.PhysicsScore = PhysicsScore;
    }

    public void study() {
        System.out.println("Student " + getName() + " is studying.");
    }

    public int getTotalScore() {
        return getChineseScore() + getMathScore() + HistoryScore + PhysicsScore;
    }

    public String toString() {
        return getID() + "    " + getName() + "    " + getChineseScore() + "    " + getMathScore() + "    " + HistoryScore + "    " + PhysicsScore + "    " + getTotalScore() + "    " + getEnterDate() + "    " + getEmail()+"    "+ getStudentStatus();
    }

    public int getHistoryScore() {
        return HistoryScore;
    }

    public void setHistoryScore(int historyScore) {
        HistoryScore = historyScore;
    }

    public int getPhysicsScore() {
        return PhysicsScore;
    }

    public void setPhysicsScore(int physicsScore) {
        PhysicsScore = physicsScore;
    }

  /*  @Override
    public int findScoreBySubject(String subject) {
        switch (subject) {
            case "语文":
                return getChineseScore();
            case "数学":
                return getMathScore();
            case "历史":
                return HistoryScore;
            case "物理":
                return PhysicsScore;
            default:
                return -1;
        }
    }*/
}
